package com.java.day4carsystem.entity;

/**
 * 卡车
 */
public class Truck extends Vehicle {

    public Truck(String number, String type, float price, String color, float gasValue, int load) {
        super(number, type, price, color, gasValue);
        this.load = load;
    }

    public Truck() {
    }

    private int load;

    public int getLoad() {
        return load;
    }

    public void setLoad(int load) {
        this.load = load;
    }

    @Override
    public float calculateRentPrice(int days) {
        return 1500 * days + load * 100;
    }

    @Override
    public void print() {
        System.out.println("卡车 车牌号：" + this.getNumber() +",颜色：" + this.getColor() +",型号：" + this.getType() +
                ",价格：" + this.getPrice() +",载重：" + this.getLoad());
    }
}
